<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <script src="jquery-3.2.1.js">
    </script>

    <script>
        function zi() {
            var text=$("#text").val();
            var type=$("#type").val();

            $.ajax({
                url:"http://jisujfhzh.market.alicloudapi.com/fontconvert/convert?content="+text+"&type="+type+"&key=0e64545be43a40e6bca00f3b0f4c2818",
                type:'GET',
                dataType:'json',
               //headers: {Accept: "application/json; charset=utf-8"}

                headers:{Authorization:'APPCODE 0e64545be43a40e6bca00f3b0f4c2818'},

                success:function(suc){

                    var latter=suc.result.rcontent;
                    $("#act").after(latter);
                }

            })


        }
        function load() {
            var username=sessionStorage.key(sessionStorage.length);
            if(sessionStorage.length==0) {
                alert("请先登录");
                window.location.href = 'http://wasd897586363.gitee.io/denglu/';
            }
            else {
                var ming = document.getElementById("dengluming");
                ming.innerHTML=sessionStorage.getItem("username");
            }



            var list=document.getElementById("list");
            var result="<table border='1'align='center'>";
            result+="<tr><td>用户名</td><td>邮箱</td><td>密码</td><td>注册时间</td></tr>";
            for(var i=0;i<localStorage.length;i++) {
                var sitename = localStorage.key(i);
                var str = localStorage.getItem(sitename);

                if (typeof str === 'string') {
                    var site = JSON.parse(str)
                }
                result += "<tr><td>" + sitename + "</td><td>" + site.email + "</td><td>" + site.password + "</td><td>" + site.timenow +"</td></tr>";
            }
            result+="</table>";
            list.innerHTML=result;


        }
        function clear() {
            window.location.href='http://wasd897586363.gitee.io/denglu/';

        }

    </script>


    <title>登录成功</title>

    <style type="text/css">
        <!--body {

            background-image: url(风流背景.jpg);
            background-repeat: no-repeat;
            text-align: center;
            background-position: center;
        }a:link {
             text-decoration: none;
             color: #000000;
         }
        a:visited {
            text-decoration: none;
            color: #000000;
        }
        a:hover {
            text-decoration: none;
        }
        a:active {
            text-decoration: none;
        }

        -->
    </style>
</head>

<body>

<h1>字体转换</h1>
<h2>需转换字</h2>
<input type="text" name="text" id="text" value="">
<h2>目标格式</h2>
<h5>2s：简体 2t：繁体 2h：火星文</h5>
<input type="text" name="type" id="type" value=""><br><br>
<img onclick="zi()" id="switch" src="转换.png" width="151" height="90"/>
<h2>结果</h2>
<div id="act"></div>

<h4>明月清风无尽岁，平生老子南楼<br><br>阎闾谈笑说封侯<br><br>谁能知许事，一笑去来休<br><br>旧见辋川图画里，十年孤负欢游<br><br>百金早晚得菟裘<br><br>与君成二老，来往亦风流</h4>

<div id="list" style="text-align:center;"></div>
<p>当前用户</p><div id="dengluming" style="text-align:center;"></div>
<a href="http://wasd897586363.gitee.io/denglu/"> <p>注销</p></a>
<footer>Welcome to 风流 ...</footer>
<script>load()</script>
</body>
</html>
